package co.laomag.coffee.utils;

import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.crypto.digest.DigestUtil;
import co.laomag.coffee.model.vo.AdminVo;
import com.alibaba.fastjson.JSON;

/**
 * @author 马泽朋
 * @version 1.0
 * @date 2020/4/18 下午 4:01
 * 生成token工具
 */
public class TokenUtils {

    public static String createToken(AdminVo adminVo){
        String s = DigestUtil.md5Hex(JSON.toJSONString(adminVo) + DateUtil.now()+ IdUtil.simpleUUID());
        return s;
    }
}
